﻿using A.M.Storage.I_Application;
using O.M.Production.Domain.DTO.Produce_work_order;
using O.M.Production.Domain.Entity;
using O.M.Production.ErrorCodeEnum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace O.M.Production.Application.IService
{
    /// <summary>
    /// 生产工单服务接口
    /// </summary>
    public interface I_produce_work_order_Service : IBaseServices<produce_work_order, string>
    {
        /// <summary>
        /// 分页查询-生产工单
        /// </summary>
        /// <param name="PWOId_Name">工单编号或名称</param>
        /// <param name="pageSize">页容量</param>
        /// <param name="pageIndex">页码</param>
        /// <returns>统一返回格式</returns>
        Task<ApiResult> Get_produce_work_order(string? PWOId_Name, int pageSize, int pageIndex);
        /// <summary>
        /// 查实单个工单实体-反填
        /// </summary>
        /// <param name="produce_work_order_id">工单编号</param>
        /// <returns>统一返回格式</returns>
        Task<ApiResult> Get_produce_work_order_Model(string? produce_work_order_id);
        /// <summary>
        /// 添加生产工单
        /// </summary>
        /// <param name="produce_Work_Order_DTO">生产工单DTO</param>
        /// <returns>统一返回格式</returns>
        Task<ApiResult> Post_Produce_Work_Order_Add(produce_work_order_DTO produce_Work_Order_DTO);
        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="produce_Work_Order_DTOs">生产工单DTO</param>
        /// <returns>统一返回格式</returns>
        Task<ApiResult> Post_Batch_Del_Work_Order_Add(List<produce_work_order_DTO> produce_Work_Order_DTOs);
        /// <summary>
        /// 修改-生产工单
        /// </summary>
        /// <param name="produce_Work_Order_DTO">生产工单DTO</param>
        /// <returns>统一返回格式</returns>
        Task<ApiResult> Post_Upd_Produce_Work_Order(produce_work_order_DTO produce_Work_Order_DTO);
        /// <summary>
        /// 修改状态-生产工单
        /// </summary>
        /// <param name="Wid">工单编号</param>
        /// <returns>0关闭 1报工 2开工 3完成 4重启</returns>
        Task<ApiResult> Put_Upd_State_Work_Order(int? Wid, int State, produce_work_order_DTO produce_Work_Order_DTO);
    }
}
